package com.stylefeng.guns.modular.goods.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.stylefeng.guns.common.CheckboxVo;
import com.stylefeng.guns.modular.goods.dao.SpecMapper;
import com.stylefeng.guns.modular.goods.model.Spec;
import com.stylefeng.guns.modular.goods.service.ISpecService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 规格表 服务实现类
 * </p>
 *
 * @author wuyifie
 * @since 2018-09-05
 */
@Service
public class SpecServiceImpl extends ServiceImpl<SpecMapper, Spec> implements ISpecService {
    @Override
    public List<CheckboxVo> checkbox() {
        List<CheckboxVo> list = Lists.newArrayList();
        for (Spec spec : selectList(null)) {
            list.add(new CheckboxVo(spec.getId(),spec.getSpecName()));
        }
        return list;
    }
}
